package com.yaj.myfactorysupport.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yaj.myfactorysupport.entity.TLotTraceTemp;
import com.yaj.myfactorysupport.mapper.TLotTraceTempMapper;
import com.yaj.myfactorysupport.service.TLotTraceTempService;
import com.yaj.myfactorysupport.util.RespBean;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author wei
 * @since 2021-05-25
 */
@Service
public class TLotTraceTempServiceImpl extends ServiceImpl<TLotTraceTempMapper, TLotTraceTemp> implements TLotTraceTempService {

    @Override
    public RespBean insertTLotTraceTemp(List<TLotTraceTemp> tLotTraces) {
        for (TLotTraceTemp tLotTrace:tLotTraces
        ) {
            if(!this.save(tLotTrace)){
                return RespBean.success("保存失败");
            }
        }

        return RespBean.success("保存成功");
    }
}
